package org.example.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.gateway.handler.predicate.BeforeRoutePredicateFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.server.ServerWebExchange;

import java.util.List;
import java.util.function.Predicate;

/**
 * @author TonySong
 * @date 2024/5/6 0006
 * @time 10:40
 */
@Component
@Slf4j
public class MyBeforeTime extends BeforeRoutePredicateFactory {


    public MyBeforeTime() {
        super();
    }

    @Override
    public List<String> shortcutFieldOrder() {
        return super.shortcutFieldOrder();
    }

    @Override
    public Predicate<ServerWebExchange> apply(Config config) {
        log.info("MyBeforeTime");

        return super.apply(config);
    }
}
